﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace _07.SumOfTheFirstMembersOfASequenceFibonacci
{
    class firstNMembersOfFibonacci
    {
        static void Main(string[] args)
        {
            Console.WriteLine("Insert n numbers");
            Console.Write("n= ");
            int n = int.Parse(Console.ReadLine());
            int sum = 0, a=0,b=1;
            for (int i = 0; i < n; i++)
            {
                b = b + a;
                a = b - a;
                sum += a;
            }
            Console.WriteLine(sum);
        }
    }
}
